// components/modal/modal.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    visible: {
      type: Boolean,
      value: false
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    visible: false
  },
  /**
   * 组件的方法列表
   */
  methods: {
    titleTap: function ({ currentTarget: { dataset: msg }}) {
      console.log(msg)
    },
    closeTap: function() {
      const state = {visible: false}
      this.setData(state)
      const detail = { ticketId: 1002050221 }
      const option = { some: 'options' }
      this.triggerEvent(
        'successcall', detail, option
      )
    }
  }
})
